import {createApp} from 'vue';
import App from './App.vue';
import router from './router/index';
import "./style/style.css";
import 'element-plus/dist/index.css'

import 'element-plus/theme-chalk/index.css';

import {
  ElButton,
  ElCol,
  ElDatePicker,
  ElDropdown,
  ElDropdownItem,
  ElDropdownMenu,
  ElForm,
  ElFormItem,
  ElIcon,
  ElInput,
  ElLoading,
  ElRadioButton,
  ElRadioGroup,
  ElRow,
} from 'element-plus';
import ECharts from 'vue-echarts';
import {use} from 'echarts/core';
import {CanvasRenderer} from 'echarts/renderers';
import {BarChart, GaugeChart, LineChart, MapChart, PieChart} from 'echarts/charts';
import {
  DataZoomComponent,
  GeoComponent,
  GridComponent,
  LegendComponent,
  TitleComponent,
  ToolboxComponent,
  TooltipComponent,
  VisualMapComponent
} from 'echarts/components';

use([CanvasRenderer, BarChart, LineChart, PieChart, MapChart,
  GridComponent, TitleComponent, TooltipComponent, LegendComponent,
  VisualMapComponent, GeoComponent, ToolboxComponent, DataZoomComponent, GaugeChart]);
const app = createApp(App);
app.component('v-chart', ECharts);

app.component(ElFormItem.name, ElFormItem);
app.component(ElInput.name, ElInput);
app.component(ElForm.name, ElForm);
app.component(ElButton.name, ElButton);
app.component(ElRow.name, ElRow);
app.component(ElCol.name, ElCol);
app.component(ElDropdown.name, ElDropdown);
app.component(ElDropdownMenu.name, ElDropdownMenu);
app.component(ElRadioGroup.name, ElRadioGroup);
app.component(ElRadioButton.name, ElRadioButton);
app.component(ElDropdownItem.name, ElDropdownItem);
app.component(ElDatePicker.name, ElDatePicker);
app.component(ElIcon.name, ElIcon);
app.use(ElLoading);

app.use(router);
app.mount('#app');
